package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.PowerUsedMapper;
import com.whq.entity.PowerUsed;
import com.whq.service.PowerUsedService;

@Service(value = "tdPowerUsedService")
public class PowerUsedServiceImpl implements PowerUsedService {

    @Autowired
    private PowerUsedMapper<PowerUsed>tdPowerUsedMapper;
    
    @Override
    public Integer insertSelective(PowerUsed tdPowerUsed) throws Exception {
           return this.tdPowerUsedMapper.insertSelective(tdPowerUsed);
        }

    @Override
    public Integer insertBatch(List<PowerUsed> tdPowerUsed) throws Exception {
           return this.tdPowerUsedMapper.insertBatch(tdPowerUsed) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdPowerUsedMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdPowerUsedMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(PowerUsed tdPowerUsed) {
           return this.tdPowerUsedMapper.updateByPrimaryKeySelective(tdPowerUsed);
    }

    @Override
    public PowerUsed findById(Object id) {
           return (PowerUsed) this.tdPowerUsedMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<PowerUsed> selectByCondition(PowerUsed tdPowerUsed) {
           return (List<PowerUsed>) this.tdPowerUsedMapper.selectByCondition(tdPowerUsed);
    }

    @Override
    public Integer selectCountByCondition(PowerUsed tdPowerUsed) {
           return  this.tdPowerUsedMapper.selectCountByCondition(tdPowerUsed);
    }

}
